//package com.ruoyi.machine.advanced.maintain.plan.controller;
//
//import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
//import com.ruoyi.common.core.controller.BaseController;
//import com.ruoyi.common.core.domain.AjaxResult;
//import com.ruoyi.common.core.page.TableDataInfo;
//import com.ruoyi.common.utils.poi.ExcelUtil;
//import com.ruoyi.machine.advanced.maintain.plan.domain.MaintainPlan;
//import com.ruoyi.machine.advanced.maintain.plan.service.IMaintainPlanService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * 设备保养计划表
// * 控制层
// */
//@RestController
//@RequestMapping("/machine/maintain/plan")
//@Api(value = "设备保养计划模块", tags = "设备保养计划接口")
//public class MaintainPlanController extends BaseController {
//
//    @Autowired
//    private IMaintainPlanService maintainPlanService;
//
//    /**
//     * 获取设备保养计划表
//     * @param maintainPlan
//     * @return
//     */
//    @ApiOperationSupport(includeParameters = {"MaintainPlan.machineId", "MaintainPlan.maintainPlanId"})
//    @ApiOperation(value = "获取设备保养计划列表",notes = "查询所有设备保养计划信息")
//    @PostMapping("/list")
//    public TableDataInfo list(@RequestBody MaintainPlan maintainPlan) {
//
//        startPage();
//
//        List<MaintainPlan> maintainPlanList = maintainPlanService.selectMaintainPlanList(maintainPlan);
//
//        return getDataTable(maintainPlanList);
//    }
//
//    /**
//     * 导出设备保养计划
//     * @param maintainPlan
//     * @return
//     */
//    @PostMapping("/export")
//    public AjaxResult export(@RequestBody MaintainPlan maintainPlan) {
//
//        List<MaintainPlan> maintainPlanList = maintainPlanService.selectMaintainPlanList(maintainPlan);
//
//        ExcelUtil<MaintainPlan> util = new ExcelUtil<>(MaintainPlan.class);
//
//        return util.exportExcel(maintainPlanList, "设备保养计划数据");
//    }
//
//    /**
//     * 新增设备保养计划
//     * @param maintainPlan
//     * @return
//     */
//    @ApiOperation(value = "新增设备保养计划", notes = "新增设备保养计划")
//    @ApiImplicitParam(name = "maintainPlan", value = "新增设备保养计划", dataType = "MaintainPlan")
//    @PostMapping("/add")
//    public AjaxResult add(@Validated @RequestBody MaintainPlan maintainPlan) {
//        return toAjax(maintainPlanService.insertMaintainPlan(maintainPlan));
//    }
//
//    /**
//     * 修改设备保养计划
//     * @param maintainPlan
//     * @return
//     */
//    @ApiOperation(value = "修改设备保养计划", notes = "修改设备保养计划")
//    @ApiImplicitParam(name = "maintainPlan", value = "修改设备保养计划", dataType = "MaintainPlan")
//    @PostMapping("/edit")
//    public AjaxResult edit(@Validated @RequestBody MaintainPlan maintainPlan) {
//        return toAjax(maintainPlanService.updateMaintainPlan(maintainPlan));
//    }
//
//    /**
//     * 删除设备保养计划
//     * @param maintainPlan
//     * @return
//     */
//    @PostMapping("/delete")
//    public AjaxResult delete(@RequestBody MaintainPlan maintainPlan) {
//        return toAjax(maintainPlanService.deleteMaintainPlan(maintainPlan));
//    }
//}
